<template>
    <text @tap.stop="callPhone(phone)" class="phone" :style="{fontSize:size+'px'}">{{phone}}</text>
</template>

<script>
export default {
    name: 'phone',
    props: {
        phone: {
            type: String,
            default(){
                return '10086'
            }
        },
        size:{
            type: [String, Number],
            default(){
                return 14
            }
        }
    },

    methods: {
        // 拨打电话
        callPhone(phone){
            uni.makePhoneCall({
                phoneNumber: phone
            });
        }
    },
}
</script>

<style scoped lang="scss">
    .phone{
        color: rgb(60, 156, 255) !important;
    }
</style>